package com.zhuangjie.coupon.enums;

import com.zhuangjie.mvc.validator.annotate.enum_valid.VerifiableEnum;

/**
 * 优惠卷批次状态
 */
public enum CouponBatchStatus implements VerifiableEnum {
    UN_CLAIMABLE((byte) 0, "不可领取"),
    CLAIMABLE((byte) 1, "可领取");

    private final byte code;
    private final String name;

    CouponBatchStatus(byte code, String name) {
        this.code = code;
        this.name = name;
    }

    public byte getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    @Override
    public byte getValue() {
        return getCode();
    }
}